package com.gzhryc.dictionary.dao;

import com.gzhryc.dictionary.dao.db.CountryArea;
import com.gzhryc.jdbc.Conditions;
import com.gzhryc.jdbc.LRTreeBaseDao;
import com.gzhryc.jdbc.Query;
import com.gzhryc.jdbc.models.Parameters;

import java.sql.SQLException;

public class CountryAreaDao extends LRTreeBaseDao<CountryArea,Long>{
	
	public CountryAreaDao(String jdbcKey){
		super(jdbcKey);
	}

	public int deleteByCountryId(Long countryId) throws SQLException {
		String sql = "DELETE from dic_country_area WHERE country_id = ?";
		Parameters parameters = new Parameters();
		parameters.setObject(countryId);
		return this.jdbcHelper.update(sql,parameters);
	}

}
